xen/ioreq: Introduce domain_has_ioreq_server()
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Fri, 29 Jan 2021 01:48:45 +0000 (03:48 +0200)
committerJulien Grall <jgrall@amazon.com>
Fri, 29 Jan 2021 16:55:23 +0000 (16:55 +0000)
commit61eda016ca94d9dcacab10bd686374e2efc87416
tree87c2495f922d0e8084596f8598918a1593a3a89a
parent4922caf1de5a08d3eefb4058de1b7f0122c8f76f
xen/ioreq: Introduce domain_has_ioreq_server()

This patch introduces a helper the main purpose of which is to check
if a domain is using IOREQ server(s).

On Arm the current benefit is to avoid calling vcpu_ioreq_handle_completion()
(which implies iterating over all possible IOREQ servers anyway)
on every return in leave_hypervisor_to_guest() if there is no active
servers for the particular domain.
Also this helper will be used by one of the subsequent patches on Arm.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
CC: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul@xen.org>
[On Arm only]
Tested-by: Wei Chen <Wei.Chen@arm.com>
xen/arch/arm/traps.c
xen/common/ioreq.c
xen/include/xen/ioreq.h